<?php
/**
 * Created by PhpStorm.
 * User: zd
 * Date: 2019/4/18
 * Time: 10:16
 */

namespace app\index\service;


class Login
{
    /**
     * 分配随机字符串，当做客户端ID，一个使用周期有效
     * @return null|string
     */
    public function getClientId(){
        return getRandChar(50);
    }

    public function getToken($ac,$se){
        $url = "https://minitest.17jxyx.com/api/v1/token/app";
        $params = ['ac'=>$ac,'se'=>$se];
        $result = curl_post($url,$params);
        $result = json_decode($result,true);
        return $result;
    }

}